﻿using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;

namespace CIS.Device.Models
{
    public class LogInfo : BindableBase
    {
        private StringBuilder _sb;
        public LogInfo()
        {
            _sb = new StringBuilder();
        }
        private string message;

        public string Message
        {
            get { return message; }
            set { message = value; RaisePropertyChanged(nameof(Message)); }
        }

        public void FormatMsg(string str)
        {
            //var msg = _sb.Append(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:fff") + " "+ str + "\n");
            var msg = _sb.Insert(0,(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:fff") + " " + str + "\n"));
            Message = msg.ToString();
        }

    }
}
